fix graph_net/sample_pass/group_ranges_from_subgraph_sources.py and graph_net/dimension_generalizer.py#589
Merged
lixinqi merged 5 commits intoPaddlePaddle:developfrom Jan 26, 2026
Conversation
|
Thanks for your contribution! |
Contributor
Author
Contributor
Author
Contributor
Author
Contributor
Author
lixinqi
reviewed
Jan 20, 2026
graph_net/dimension_generalizer.py
Outdated
| for symbol, dim in symbol2example_value.items() | ||
| for sym_name in [symbol.name] | ||
| """ | ||
| 📍 关键修改1:使用索引而非符号字符串 |
lixinqi
reviewed
Jan 20, 2026
graph_net/dimension_generalizer.py
Outdated
Comment on lines
141
to
143
| Key modification 1: Use indices instead of symbol strings | ||
| Key modification 2: Find corresponding index through dimension value matching | ||
| Key modification 3: Path structure changed from model/name to index/model |
Collaborator
There was a problem hiding this comment.
这些日志类的语气特别不合适。这一看就是给此时此刻的我看的,其他人看了一脸懵。
你和大模型说:不要使用日志语气描述修改内容,要面向长期读者写当前代码在整体中的作用。
lixinqi
reviewed
Jan 23, 2026
|
|
||
| For example: model_startX_endY_Z -> [X, Y] | ||
| """ | ||
| match = re.search(r"start(\d+)_end(\d+)", path) |
Collaborator
There was a problem hiding this comment.
这是不对的。
这是一种tricky的做法。只要你在当前类里见到了start, end等字眼,你就是在强耦合。
Contributor
Author
There was a problem hiding this comment.
可以修改完全从subgraph中提取信息,但是从文件中看,和#589 (comment) 也是不对应的,还是说明逻辑错误呀

Contributor
Author
There was a problem hiding this comment.
改成从某个样本的subgraph_sources中提取范围
lixinqi
approved these changes
Jan 26, 2026
Contributor
Author
|
转化率在small10_torch_samples_list.txt的结果为21/104 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




PR Category
other
Description
graph_net/dimension_generalizer.py主要修改_get_to_model_path函数使其生成0-8总共9个空间
graph_net/sample_pass/group_ranges_from_subgraph_sources.py 修改了生成文件逻辑,保证不会出现区间重复以及进行字典序排序